package com.cookie.entity;

/**
 * @author dyx
 * @description Note类是一个基础的笔记类, 用于存储进MindMap的基本单元
 * @date 2024/12/25 15:47
 **/
public class Note {


    /**
     * title: Note的标题
     * content: Note的内容
     * author: 创建Note的作者
     * label: Note的标签
     */
    String id;
    String title;
    String content;
    String author;
    String label;

    /** mysql建表语句
     * CREATE TABLE tb_notes (
     *     id VARCHAR(255) PRIMARY KEY,
     *     title VARCHAR(255),
     *     content TEXT,
     *     author VARCHAR(255),
     *     label VARCHAR(255)
     * );
     */
    public Note() {
    }

    public Note(String id, String title, String content, String author, String label) {
        this.id = id;
        this.title = title;
        this.content = content;
        this.author = author;
        this.label = label;
    }

    /**
     * 获取
     * @return id
     */
    public String getId() {
        return id;
    }

    /**
     * 设置
     * @param id 笔记编号
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 获取
     * @return title
     */
    public String getTitle() {
        return title;
    }

    /**
     * 设置
     * @param title 笔记标题
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * 获取
     * @return content
     */
    public String getContent() {
        return content;
    }

    /**
     * 设置
     * @param content 笔记内容
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * 获取
     * @return author
     */
    public String getAuthor() {
        return author;
    }

    /**
     * 设置
     * @param author 作者
     */
    public void setAuthor(String author) {
        this.author = author;
    }

    /**
     * 获取
     * @return label
     */
    public String getLabel() {
        return label;
    }

    /**
     * 设置
     * @param label 标签
     */
    public void setLabel(String label) {
        this.label = label;
    }

    public String toString() {
        return "Note{id = " + id + ", title = " + title + ", content = " + content + ", author = " + author + ", label = " + label + "}";
    }
}
